<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>single_nubot_gazebo: src/nubot_common/core/include/nubot/core/Line.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">single_nubot_gazebo
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_93262b1c7483f4ea8c70e946e7488dda.html">src</a></li><li class="navelem"><a class="el" href="dir_b89c572576b5836e921eba814157f82a.html">nubot_common</a></li><li class="navelem"><a class="el" href="dir_bc336a74354ab03ae1a066564339fe6a.html">core</a></li><li class="navelem"><a class="el" href="dir_b079fcacf30cb25eef8fa3a3ed6b781d.html">include</a></li><li class="navelem"><a class="el" href="dir_effbbc41f85462a3db372dff6a4e60c7.html">nubot</a></li><li class="navelem"><a class="el" href="dir_52eb59d5964670d54dcc5c2dd269722d.html">core</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Line.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="Line_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __NUBOT_CORE_LINE_HPP__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define __NUBOT_CORE_LINE_HPP__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="PPoint_8hpp.html">PPoint.hpp</a>&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">namespace </span>nubot</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;{</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html">   10</a></span>&#160;<span class="keyword">class </span><a class="code" href="classnubot_1_1Line__.html">Line_</a></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;{</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <span class="comment">// various constructors</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_</a>();</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line);</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_</a>(<span class="keywordtype">double</span> a,<span class="keywordtype">double</span> b,<span class="keywordtype">double</span> c);</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_</a>(<span class="keywordtype">double</span> k,<span class="keywordtype">double</span> b);</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt;  <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt1,<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt2);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt;  <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_</a>(<span class="keywordtype">double</span> k,<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt);</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classnubot_1_1Line__.html#a3518fa7936f488fe013454c43e40d1b9">isParallel</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classnubot_1_1Line__.html#a824b937e1c6179590b078036e9ea2d87">isOrthogonal</a> (<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt; <span class="keywordtype">double</span> <a class="code" href="classnubot_1_1Line__.html#a2922d374fef598bcc7d12a74a7923e92">distance</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt) <span class="keyword">const</span> ;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classnubot_1_1Line__.html#a2922d374fef598bcc7d12a74a7923e92">distance</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line) <span class="keyword">const</span> ;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;double&gt;</a> <a class="code" href="classnubot_1_1Line__.html#a11716bc7ffee70394aeb54fbb6acc1a6">crosspoint</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">   38</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>,<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>,<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>;  <span class="comment">//&lt; general form: Ax+By+C=0;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">   39</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>,<a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a>;     <span class="comment">//&lt; slope and intercept form:Ax+By+C=0        </span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">   40</a></span>&#160;    <span class="keywordtype">bool</span>   <a class="code" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">isSlope_</a>;  <span class="comment">//&lt; whether the slope is exist;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">   41</a></span>&#160;    <span class="keywordtype">bool</span>   <a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>;   <span class="comment">//&lt; whether it is a line or not;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;};</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">   46</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_::Line_</a>() : A_(0.),B_(0.),C_(0.),k_(0.),b_(0.),isSlope_(false),isLine_(false) {}</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a42dae13f70c2c713bb6a8e1c294b36e5">   47</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_::Line_</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line) : A_(line.A_),B_(line.B_),C_(line.C_),</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    k_(line.k_),b_(line.b_),isSlope_(line.isSlope_),isLine_(line.isLine_) {}</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a53cffb2a64d15a9a3abee89ef16f099a">   49</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_::Line_</a>(<span class="keywordtype">double</span> a,<span class="keywordtype">double</span> b,<span class="keywordtype">double</span> c) : A_(a),B_(b),C_(c),isLine_(a!=0||b!=0)</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;{</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>!=0)</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    {</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">isSlope_</a>=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>=-<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>/<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a>=-<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>/<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    }</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>=0;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a>=0;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">isSlope_</a>=<span class="keyword">false</span>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    }</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#ab8872471a644ac3124ec5046843513a1">   64</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_::Line_</a>(<span class="keywordtype">double</span> k,<span class="keywordtype">double</span> b) : k_(k),b_(b),A_(k),B_(-1),C_(b),isSlope_(true),isLine_(true) {}</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#ad039d75b78c9c4b47da641b96e581ccf">   65</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt; <span class="keyword">inline</span> <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_::Line_</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt1,<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt2)</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;{</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">if</span>(pt1!=pt2)</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    {</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordflow">if</span>(pt1.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>!=pt2.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>) </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>=double(pt2.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>-pt1.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>)/double(pt2.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>-pt1.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a>=double(pt1.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>*pt2.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>-pt2.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>*pt1.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>)/double(pt2.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>-pt1.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>=<a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>=-1.0;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>=<a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a>;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">isSlope_</a>=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        }</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>=1;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>=0.0;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>=-pt1.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>=0;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a>=0;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            <a class="code" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">isSlope_</a>=<span class="keyword">false</span>;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    {</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>=0;<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>=0;<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>=0;<a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>=0;<a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a>=0;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>=<span class="keyword">false</span>;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <a class="code" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">isSlope_</a>=<span class="keyword">false</span>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;}</div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a98c59bbad204ed81dfb7575e1dde42b6">   96</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt; <span class="keyword">inline</span>  <a class="code" href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">Line_::Line_</a>(<span class="keywordtype">double</span> k,<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt)</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;{</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a> = k;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a> = double(pt.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>-k*pt.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a> = k;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a> = -1.0;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a> = <a class="code" href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">b_</a>;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <a class="code" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">isSlope_</a>=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;}</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a3518fa7936f488fe013454c43e40d1b9">  106</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classnubot_1_1Line__.html#a3518fa7936f488fe013454c43e40d1b9">Line_::isParallel</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line)<span class="keyword"> const</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>&amp;&amp;line.<a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>)</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keywordflow">return</span>((line.<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>-<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*line.<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>)==0);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;}</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a824b937e1c6179590b078036e9ea2d87">  113</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classnubot_1_1Line__.html#a824b937e1c6179590b078036e9ea2d87">Line_::isOrthogonal</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line)<span class="keyword"> const</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>&amp;&amp;line.<a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>)</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordflow">return</span>((<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*line.<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>+<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>*line.<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>)==0);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;}</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a2922d374fef598bcc7d12a74a7923e92">  121</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt; <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classnubot_1_1Line__.html#a2922d374fef598bcc7d12a74a7923e92">Line_::distance</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt)<span class="keyword"> const </span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordflow">return</span> (std::abs(<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*pt.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>+<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>*pt.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>+<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>)/sqrt(<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>+<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>*<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>));</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;}</div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#acaffff55fb8e0e3ec80ecc759ad92052">  125</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classnubot_1_1Line__.html#a2922d374fef598bcc7d12a74a7923e92">Line_::distance</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line)<span class="keyword"> const</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="classnubot_1_1Line__.html#a3518fa7936f488fe013454c43e40d1b9">isParallel</a>(line))</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="keywordflow">return</span> (std::abs(<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>-line.<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>)/sqrt(<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>+<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>*<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>));</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordflow">return</span> (0.0);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;}</div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="classnubot_1_1Line__.html#a11716bc7ffee70394aeb54fbb6acc1a6">  132</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;double&gt;</a> <a class="code" href="classnubot_1_1Line__.html#a11716bc7ffee70394aeb54fbb6acc1a6">Line_::crosspoint</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line)<span class="keyword"> const</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;double&gt;</a> pt=<a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;double&gt;</a>(0.0,0.0);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordtype">double</span> ycoef=double(<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*line.<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>-line.<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>&amp;&amp;line.<a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>&amp;&amp;ycoef!=0)</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    {</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        pt.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>=double(<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>*line.<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>-line.<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>*<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>)/ycoef;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        pt.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>=double(-<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*line.<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>+line.<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>*<a class="code" href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">C_</a>)/ycoef;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">return</span> pt;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;}</div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="namespacenubot.html#a1ff5f24d4f83aa4e31f28cef699a3507">  144</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt; <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> <a class="code" href="namespacenubot.html#a1ff5f24d4f83aa4e31f28cef699a3507">verticalline</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line,<span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt) </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;{</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <span class="keywordflow">if</span>(line.<a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>)</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    {</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordflow">if</span>(line.<a class="code" href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">isSlope_</a>)</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        {</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;            <span class="keywordflow">if</span>(line.<a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>==0)</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a>(1,0,-pt.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a>(-1.0/line.<a class="code" href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">k_</a>,pt);</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        }  </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a>(0.0,pt.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    }</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a>();</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;}</div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="namespacenubot.html#a822e3dc5ebbc620d8478f5cc78ed8665">  162</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt; <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> <a class="code" href="namespacenubot.html#a822e3dc5ebbc620d8478f5cc78ed8665">pointinline</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line , <span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt,<span class="keywordtype">double</span> dis)</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;{</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordtype">double</span> theta=atan2(line.<a class="code" href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">A_</a>,-line.<a class="code" href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">B_</a>);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a>(_Tp(pt.<a class="code" href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">x_</a>+dis*cos(theta)),_Tp(pt.<a class="code" href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">y_</a>+dis*sin(theta)));</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;}</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div>
<div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="namespacenubot.html#a3ef23abce325d44c7509330711f673f2">  171</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> _Tp&gt; <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> <a class="code" href="namespacenubot.html#a3ef23abce325d44c7509330711f673f2">verticalpoint</a>(<span class="keyword">const</span> <a class="code" href="classnubot_1_1Line__.html">Line_</a> &amp; line , <span class="keyword">const</span> <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;_Tp&gt;</a> &amp; pt)</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;{</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;double&gt;</a> outpt=<a class="code" href="classnubot_1_1DPoint__.html">DPoint_&lt;double&gt;</a>(0.0,0.0);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keywordflow">if</span>(line.<a class="code" href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">isLine_</a>)</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    {</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <a class="code" href="classnubot_1_1Line__.html">Line_</a> vertical_line=<a class="code" href="namespacenubot.html#a1ff5f24d4f83aa4e31f28cef699a3507">verticalline</a>(line,pt);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        outpt=line.<a class="code" href="classnubot_1_1Line__.html#a11716bc7ffee70394aeb54fbb6acc1a6">crosspoint</a>(vertical_line);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="keywordflow">return</span> outpt;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;}</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;}</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="preprocessor">#endif </span></div>
<div class="ttc" id="classnubot_1_1Line___html_a57c955f64b7b2ecf2858f589c1880a45"><div class="ttname"><a href="classnubot_1_1Line__.html#a57c955f64b7b2ecf2858f589c1880a45">nubot::Line_::b_</a></div><div class="ttdeci">double b_</div><div class="ttdef"><b>Definition:</b> Line.hpp:39</div></div>
<div class="ttc" id="classnubot_1_1Line___html_a2922d374fef598bcc7d12a74a7923e92"><div class="ttname"><a href="classnubot_1_1Line__.html#a2922d374fef598bcc7d12a74a7923e92">nubot::Line_::distance</a></div><div class="ttdeci">double distance(const DPoint_&lt; _Tp &gt; &amp;pt) const </div><div class="ttdoc">the distance between a point and a line; </div><div class="ttdef"><b>Definition:</b> Line.hpp:121</div></div>
<div class="ttc" id="classnubot_1_1Line___html"><div class="ttname"><a href="classnubot_1_1Line__.html">nubot::Line_</a></div><div class="ttdef"><b>Definition:</b> Line.hpp:10</div></div>
<div class="ttc" id="classnubot_1_1Line___html_a11716bc7ffee70394aeb54fbb6acc1a6"><div class="ttname"><a href="classnubot_1_1Line__.html#a11716bc7ffee70394aeb54fbb6acc1a6">nubot::Line_::crosspoint</a></div><div class="ttdeci">DPoint_&lt; double &gt; crosspoint(const Line_ &amp;line) const </div><div class="ttdoc">the cross point of two lines; </div><div class="ttdef"><b>Definition:</b> Line.hpp:132</div></div>
<div class="ttc" id="classnubot_1_1DPoint___html"><div class="ttname"><a href="classnubot_1_1DPoint__.html">nubot::DPoint_</a></div><div class="ttdef"><b>Definition:</b> DPoint.hpp:11</div></div>
<div class="ttc" id="namespacenubot_html_a1ff5f24d4f83aa4e31f28cef699a3507"><div class="ttname"><a href="namespacenubot.html#a1ff5f24d4f83aa4e31f28cef699a3507">nubot::verticalline</a></div><div class="ttdeci">static Line_ verticalline(const Line_ &amp;line, const DPoint_&lt; _Tp &gt; &amp;pt)</div><div class="ttdoc">get the vertical line which passes through point pt; </div><div class="ttdef"><b>Definition:</b> Line.hpp:144</div></div>
<div class="ttc" id="classnubot_1_1Line___html_a824b937e1c6179590b078036e9ea2d87"><div class="ttname"><a href="classnubot_1_1Line__.html#a824b937e1c6179590b078036e9ea2d87">nubot::Line_::isOrthogonal</a></div><div class="ttdeci">bool isOrthogonal(const Line_ &amp;line) const </div><div class="ttdoc">whether the line is orthogonal </div><div class="ttdef"><b>Definition:</b> Line.hpp:113</div></div>
<div class="ttc" id="classnubot_1_1Line___html_a2949bf29de27c89c653afb5ca77c30d3"><div class="ttname"><a href="classnubot_1_1Line__.html#a2949bf29de27c89c653afb5ca77c30d3">nubot::Line_::C_</a></div><div class="ttdeci">double C_</div><div class="ttdef"><b>Definition:</b> Line.hpp:38</div></div>
<div class="ttc" id="classnubot_1_1DPoint___html_af48f202ad9774bb7bb51ffe0e9932e7e"><div class="ttname"><a href="classnubot_1_1DPoint__.html#af48f202ad9774bb7bb51ffe0e9932e7e">nubot::DPoint_::y_</a></div><div class="ttdeci">_Tp y_</div><div class="ttdef"><b>Definition:</b> DPoint.hpp:48</div></div>
<div class="ttc" id="PPoint_8hpp_html"><div class="ttname"><a href="PPoint_8hpp.html">PPoint.hpp</a></div></div>
<div class="ttc" id="classnubot_1_1Line___html_a6ec007dca1b1a5ae1132290dea230545"><div class="ttname"><a href="classnubot_1_1Line__.html#a6ec007dca1b1a5ae1132290dea230545">nubot::Line_::B_</a></div><div class="ttdeci">double B_</div><div class="ttdef"><b>Definition:</b> Line.hpp:38</div></div>
<div class="ttc" id="classnubot_1_1Line___html_accfccb14bb889d1579c653aed927fb82"><div class="ttname"><a href="classnubot_1_1Line__.html#accfccb14bb889d1579c653aed927fb82">nubot::Line_::isLine_</a></div><div class="ttdeci">bool isLine_</div><div class="ttdef"><b>Definition:</b> Line.hpp:41</div></div>
<div class="ttc" id="classnubot_1_1Line___html_a569a0bc980db41b36ad5471811b8dc87"><div class="ttname"><a href="classnubot_1_1Line__.html#a569a0bc980db41b36ad5471811b8dc87">nubot::Line_::k_</a></div><div class="ttdeci">double k_</div><div class="ttdef"><b>Definition:</b> Line.hpp:39</div></div>
<div class="ttc" id="classnubot_1_1DPoint___html_a331b9929a84f05c009479ec70b88be37"><div class="ttname"><a href="classnubot_1_1DPoint__.html#a331b9929a84f05c009479ec70b88be37">nubot::DPoint_::x_</a></div><div class="ttdeci">_Tp x_</div><div class="ttdef"><b>Definition:</b> DPoint.hpp:48</div></div>
<div class="ttc" id="classnubot_1_1Line___html_a3518fa7936f488fe013454c43e40d1b9"><div class="ttname"><a href="classnubot_1_1Line__.html#a3518fa7936f488fe013454c43e40d1b9">nubot::Line_::isParallel</a></div><div class="ttdeci">bool isParallel(const Line_ &amp;line) const </div><div class="ttdoc">whether the line is parallel </div><div class="ttdef"><b>Definition:</b> Line.hpp:106</div></div>
<div class="ttc" id="namespacenubot_html_a822e3dc5ebbc620d8478f5cc78ed8665"><div class="ttname"><a href="namespacenubot.html#a822e3dc5ebbc620d8478f5cc78ed8665">nubot::pointinline</a></div><div class="ttdeci">static DPoint_&lt; _Tp &gt; pointinline(const Line_ &amp;line, const DPoint_&lt; _Tp &gt; &amp;pt, double dis)</div><div class="ttdoc">get the point which has the dis with pt in line </div><div class="ttdef"><b>Definition:</b> Line.hpp:162</div></div>
<div class="ttc" id="classnubot_1_1Line___html_a24e8175ccedd35f48fea06f34f0e4ee6"><div class="ttname"><a href="classnubot_1_1Line__.html#a24e8175ccedd35f48fea06f34f0e4ee6">nubot::Line_::isSlope_</a></div><div class="ttdeci">bool isSlope_</div><div class="ttdef"><b>Definition:</b> Line.hpp:40</div></div>
<div class="ttc" id="classnubot_1_1Line___html_a78d6e6771b3542aeac3092b28c6f8477"><div class="ttname"><a href="classnubot_1_1Line__.html#a78d6e6771b3542aeac3092b28c6f8477">nubot::Line_::A_</a></div><div class="ttdeci">double A_</div><div class="ttdef"><b>Definition:</b> Line.hpp:38</div></div>
<div class="ttc" id="namespacenubot_html_a3ef23abce325d44c7509330711f673f2"><div class="ttname"><a href="namespacenubot.html#a3ef23abce325d44c7509330711f673f2">nubot::verticalpoint</a></div><div class="ttdeci">static DPoint_&lt; _Tp &gt; verticalpoint(const Line_ &amp;line, const DPoint_&lt; _Tp &gt; &amp;pt)</div><div class="ttdef"><b>Definition:</b> Line.hpp:171</div></div>
<div class="ttc" id="classnubot_1_1Line___html_af1cbf1f7e8d5f398bfa04636ab84ff4d"><div class="ttname"><a href="classnubot_1_1Line__.html#af1cbf1f7e8d5f398bfa04636ab84ff4d">nubot::Line_::Line_</a></div><div class="ttdeci">Line_()</div><div class="ttdef"><b>Definition:</b> Line.hpp:46</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Jul 30 2016 00:26:42 for single_nubot_gazebo by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
